define(['core/boilerplate'],
	function(Boilerplate) {
		var Example = function() {

			this.name = "Example";

			this.init = function() {
				// Initialize Example
			}
		}

		Example.prototype = {
			update : function() {
				debug('Example is running');
				// Update Example objects
				this.render();
			},
			render : function() {
				// Render Example
				drawRect(Boilerplate.scene.ctx,"rgba(150,150,150,.8)",0,0,Boilerplate.scene.width,Boilerplate.scene.height);

				// Config
				c_x = Boilerplate.scene.width/2;
				c_y = Boilerplate.scene.height/2;
				size = 20;

				// First Hexa
				colors = {
					odd : { sS : "rgba(255,255,255,1)", fS : "rgba(0,0,0,1)" },
					even : { sS : "rgba(0,0,0,1)", fS : "rgba(255,255,255,1)" }
				}
				color = colors.odd;
				drawHexagon(Boilerplate.scene.ctx, color.sS, color.fS, c_x, c_y, size);

				height = (Math.sqrt(3)/2 * (size*2));
				width = (3/4 * (size*2));

				// Neighbor
				neighbors = [
				   {x: 0, y: 1},
				   // {x: 1, y: -1},
				   // {x: -1, y: 0},
				   // {x: 0, y: -1},
				   // {x: 1, y: -1},
				   // {x: 1, y: 0},

				   // {x: 0, y: 2},
				   // {x: 0, y: -2},
				   // {x: 2, y: 0},
				   // {x: -2, y: 0},
				]

				color = colors.even;
				for (var i = 0; i < neighbors.length; i++) {
					d = neighbors[i];

					x = d.x;
					y = d.y;
					z = -1 * (x+y);
					console.log('x : '+x+', y : '+y+', z : '+z);

					if (d.x === 0) {
						x = c_x + ( width * d.x);
						y = c_y + ( height * d.y);
					}
					else if (d.y === 0) {
						x = c_x + ( width * d.x);
						y = c_y + ( height/2 * d.x);
					}
					else {
						x = c_x + ( width * d.x);
						y = c_y + ( height/2 * d.y);
					}

					drawHexagon(Boilerplate.scene.ctx, color.sS, color.fS, x, y, size);
				};
			}
		}

		return Example;
	}
);